import moment from 'moment'

export function dateFormat (time, format) {
  return time ? moment(time).format(format || 'YYYY-MM-DD HH:mm:ss') : ''
}
